package com.coincalf.wallet.feign;

import com.coincalf.wallet.feign.dto.UserInfoDTO;
import com.coincalf.wallet.feign.hystrix.UserInfoServiceClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 用户信息微服务
 */
@FeignClient(value = "coincalf-wallet-service", fallback = UserInfoServiceClientFallback.class)
public interface UserInfoServiceClient {

    /**
     * 同步注册用户信息
     *
     * @param userInfoDTO
     * @return
     */
    @RequestMapping(value = "/user", method = RequestMethod.POST)
    boolean addUserInfo(@RequestBody UserInfoDTO userInfoDTO);

    /**
     * 同步用户信息
     *
     * @param userInfoDTO
     * @return
     */
    @RequestMapping(value = "/user", method = RequestMethod.PUT)
    boolean updateUserInfo(@RequestBody UserInfoDTO userInfoDTO);
}
